package com.spring.pojo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @author:liuwei
 * @creatdate:2021-07-13-9:13
 */
//这个注解的意思就是说明这个类被spring接管了，注册到了容器中
@Component
public class User {
	@Value("张三")
	private String name;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return "User{" +
				"name='" + name + '\'' +
				'}';
	}
}
